﻿# -*- coding: utf-8 -*-

import os, re
import app_config

app_ids = [
            # ############################################################
            #You need to change these to your own settings!!!
            #google_appengine_app_id and admin_emails are must!
            
            #(google_appengine_app_id, admin_emails, google_analytics_id)
            ('fashion-girls', ['appwill002@gmail.com'], 'UA-9726605-4'),
            # ############################################################
          ]

def run_cmd(cmd):
    os.system(cmd)
    
def upload():
    print '********************************************************************************************'
    print 'Start deploying...'
    run_cmd('appcfg.py update .\\')
    print 'Done!'
    print '********************************************************************************************'

def upload_all_apps(apps):
    for (app_id, admin_emails, google_analytics_id) in apps:
        app_config.changToAPPID(app_id)
        app_config.setAdmin(admin_emails)
        app_config.setGoogleAnalyticsId(google_analytics_id)
        upload()
    
if __name__ == '__main__':
    upload_all_apps(app_ids)
    
